﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using game.tool;

namespace game
{
    public enum CellState
    {
        Idel,
        Swap,
        Rectcle,
        Fall,
    }
    public class CellDatabase : Singleton<CellDatabase>
    {
        public CellPrefab cellPrefab;
        public float cellSize = 1;
        public float cellDragZonePect = 0.2f;
        public float CellDragSwapDuration = 0.2f;
        public float ElementRecycle = 0.2f;
        public float CellFallDuration = 5f;
        public float cellDragZone
        {
            get { return cellSize * cellDragZonePect; }
        }

        public Vector2 XY2Pos(int _x, int _y, Vector2 _offset)
        {
            return new Vector2(_x * cellSize + _offset.x, _y * cellSize + _offset.y);
        }
    }
}

